//
//  SeekHelpDetailVC.m
//  智慧小区
//
//  Created by 高永杨 on 2017/3/20.
//  Copyright © 2017年 zhongchuang. All rights reserved.
//

#import "SeekHelpDetailVC.h"
#import <AFNetworking.h>
@interface SeekHelpDetailVC ()
@property (weak, nonatomic) IBOutlet UIButton *typeTitle;
@property (weak, nonatomic) IBOutlet UILabel *desertTitle;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;
@property (weak, nonatomic) IBOutlet UILabel *authorLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLable;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@end

@implementation SeekHelpDetailVC

-(void)goBack
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"求助详情";
    [self setNav:self];
    // Do any additional setup after loading the view from its nib.
    [self loadNewData];
    
}
-(void)loadNewData
{
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    NSDictionary *dict = @{@"opt":@"21",@"id":self.temStrID};
    [manager GET:GolobaUrl parameters:dict progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        NSDictionary *results = responseObject[@"results"];
        self.titleLabel.text = [NSString stringWithFormat:@"标题:%@",results[@"title"]];
        self.contentLabel.text = results[@"content"];
        self.timeLable.text = results[@"publishTime"];
        self.authorLabel.text = [NSString stringWithFormat:@"发布人:%@",results[@"userName"]];
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
